<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set var="ctx" scope="page" value="${request.contextPath}" />
<!DOCTYPE  >
<html >
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0,viewport-fit=cover">
    <title>工单详细信息</title>
    <link rel="stylesheet" type="text/css" href="${ctx}/static/weui/1.1.2/weui-for-work.min.css"/>
    <script type="text/javascript" src="${ctx}/static/jquery/jquery-1.8.3.min.js"></script>
    <%--<script type="text/javascript" src="https://res.wx.qq.com/open/libs/weuijs/1.1.2/weui.min.js"></script>--%>
    <!-- 企业微信的JS-SDK -->
    <%--<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>--%>

</head>
<body style="background-color: #f8f8f8">
<div class="page__bd">
    <div class="weui-cells__title">工单详细信息</div>
    <div class="weui-cells">
        <div class="weui-cell">
            <div class="weui-cell__bd">
                <p>工单号：<span><c:out value="${repaireCustomerVO.workOrderId}"/></span></p>
            </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__bd">
                <p>维修人员姓名：<span><c:out value="${repaireCustomerVO.repaireName}"/></span></p>
            </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__bd">
                <p>维修人员手机号：<span><c:out value="${repaireCustomerVO.mobile}"/></span></p>
            </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__bd">
                <p>分机：<span><c:out value="${repaireCustomerVO.telphone}"/></span></p>
            </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__bd">
                <p>故障描述：<span><c:out value="${repaireCustomerVO.description}"/></span></p>
            </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__bd">
                <p>维修处理说明：<span><c:out value="${repaireCustomerVO.processSpecification}"/></span></p>
            </div>
        </div>
        <br/>
        <div class="weui-cell">
            <div class="weui-cells__title">满意度信息</div>
        </div>
        <div class="weui-cell__bd">
            <p>满意度信息：<span><c:out value="${repaireCustomerVO.satisfied}"/></span></p>
        </div>
        <div class="weui-cell__bd">
            <p>评价信息：<span><c:out value="${repaireCustomerVO.description}"/></span></p>
        </div>

        <div class="weui-btn-area">
            <a class="weui-btn weui-btn_primary"  href="#" onclick="javascript:addCustomerSatisfaction(${repaireCustomerVO.workOrderId})" id="showTooltips">关闭</a>
        </div>
</div>
<script>
    function addCustomerSatisfaction(workOrderId){
        $.post( '${ctx}/weixin/customerSatisfaction/add',{
            workOrderId:workOrderId,
            satisfied:$('input[name=satisfied] :checked').val(),
            description:$("input[name=description]").val()
        },function (result) {
            var json = JSON.parse(result);
            if(json.code=='0'){
                location.href = '/weixin/success.jsp'
//                WeixinJSBridge.call('closeWindow');
            }else {
                alert('提交失败'+json.msg);
            }
        });
    }


</script>

</body>
</html>
